---
sidebar_label: Fireworks
---

import CodeBlock from "@theme/CodeBlock";

# Fireworks

The `FireworksEmbeddings` class allows you to use the Fireworks AI API to generate embeddings.

## Setup

First, sign up for a [Fireworks API key](https://fireworks.ai/) and set it as an environment variable called `FIREWORKS_API_KEY`.

Next, install the `@langchain/community` package as shown below:

import IntegrationInstallTooltip from "@mdx_components/integration_install_tooltip.mdx";

<IntegrationInstallTooltip></IntegrationInstallTooltip>

```bash npm2yarn
npm install @langchain/community
```

## Usage

import FireworksExample from "@examples/models/embeddings/fireworks.ts";

<CodeBlock language="typescript">{FireworksExample}</CodeBlock>
